<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        /* 
            var obj = new Object();

            var obj = {key:value,key:value,...}
        */
        var student01 = new Object();
        student01.id = 1001;
        student01.name = "张三";
        student01.age = 23;
        student01.sayHello = function(){
            console.log("hello");
        }
        console.log(student01);
        //student01.sayHello();

        var student02 = {
            id:1002,
            name:"李四",
            age:23,
            sayHello:function() {
                console.log("你好");
            }
        }
        console.log(student02);
        student02.sayHello();
    </script>
</body>
</html>